#ifndef BOUND_HH_
# define BOUND_HH_

#include <exception>
#include <sstream>
#include <iostream>
#include <glpk.h>

class bound
{
public:
  enum type {FREE, LOWER, UPPER, DOUBLE, FIXED};

  bound();
  bound(type t, double value);
  bound(double lvalue, double rvalue);

  
  int get_type ();
  double get_lvalue ();
  double get_rvalue ();

  void print (std::ostream& stream) const;
  friend std::ostream& operator<< (std::ostream&, const bound& w);
protected:
  type type_;
  double v1_;
  double v2_;
};



class bad_args : public std::exception
{
public:
  bad_args (bound::type t, unsigned nb);
  virtual const char* what() const throw();

private:
  bound::type type_;
  unsigned nb_;
};

#endif /* BOUND_HH_ */
